<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
  <script src="../js/vue.js"></script>
</head>
<body>
  <div id="root">
    <input type="text" v-model.trim="msg"><br>
    <input type="text" v-model.number="msg2"><br>
    <input type="text" v-model.lazy="msg3">

    <br>
    <button @click="hint">提示</button>
  </div>
  <script>
    new Vue({
      el: '#root',
      data: {
        msg: '',
        msg2: '',
        msg3: ''
      },
      methods: {
        hint () {
          console.log('---' + this.msg + '-----')
        }
      }
    })
  </script>
</body>
</html>